/*
 * Copyright (c) 2016- 2020 qolome.com Inc. All Rights Reserved.
 * ProjectName: qolome-knowledge
 * FileName: Test.java
 * Author: jiangfeng@qolome.com
 * Date: 2020/3/11 上午9:11
 * LastModified: 2020/03/11 09:11:11
 */

package com.qolome.knowledge.design.pattern.composite.demo.safe;

import lombok.extern.slf4j.Slf4j;

/**
 * @author Qolome
 * @version V1.0
 * @Description 测试类
 * @date 2020年 03月11日 09:11:48
 */
@Slf4j
public class Test {

    public static void main(String[] args) {

      log.info("========= 安全的组合模式==========");

      File qq = new File("腾讯QQ");
      File wechat = new File("腾讯微信");
      File powerpoint = new File("Powerpoint");
      File word = new File("Word");
      File excel = new File("Excel");

      Folder office  = new Folder("办公软件",2);
      office.add(powerpoint);
      office.add(word);
      office.add(excel);
      Folder tm  = new Folder("即时通讯",2);
      tm.add(qq);
      tm.add(wechat);
      Folder software = new Folder("software",1);
      software.add(tm);
      software.add(office);
      software.list();


    }
}
